import { createRouter, createWebHashHistory } from 'vue-router'

import Manager from '../views/manager/Index.vue'
import MapEditor from '../views/manager/MapEditor.vue'
import RobotEditor from '../views/manager/RobotEditor.vue'
import HeroEditor from '../views/manager/HeroEditor.vue'
import SkillEditor from '../views/manager/SkillEditor.vue'
import WeaponEditor from '../views/manager/WeaponEditor.vue'

const routes = [
    { path: '/', redirect: '/manager' },
    {
        path: '/manager', component: Manager, name:'nanager' , children: [
            { path: 'map', component: MapEditor , name : 'map'},
            { path: 'robot', component: RobotEditor ,name : 'robot'},
            { path: 'hero', component: HeroEditor , name : 'hero' },
            { path: 'skill', component: SkillEditor , name : 'skill' },
            { path: 'weapon', component: WeaponEditor , name : 'weapon' },
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})


export default router